Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix undefined on formula toolbar selection #1

Open
wants to merge 18 commits into
base: formulajs-range-selection
Choose a base branch
from

Conversation

ThibautSF
Copy link

Fix the bug reported in myliang#363 (comment)

chieveit and others added 18 commits September 17, 2020 09:52
Fixes a path error on Windows when looking for tests within the test folder.
Using the locale function now adds the specified language to the front of a
list of languages which are searched for a translation string.

This allows a primary language as well as one or more fallback languages. On
initialization, the languages array contains only English---making English the
default fallback.

To clear the existing languages array upon specifying a language, set the
clearLangList argument of the locale function to true.
If a locale messages key contains a '.' character, it must be escaped with a
backslash. Because the backslash character must itself be escaped with a
backslash, the proper way to write a key the includes a '.' character is:

{
	"My\\.Key": "Value"
}

Some Excel formula names include a '.' character, so creating a translation
value using that formula name as a key requires support for '.' in keys.
Replace existing formula parsing and execution with an external parser library
built on top of formula.js: https://github.com/handsontable/formula-parser

This dramatically increases the number of supported formulas; see list here:
https://formulajs.info/functions/
Formula keys within locale files should match the name of the formulajs
function that a translation string is being provided for.

If a formula name has a '.' in it, it should be escaped as follows:
{
	"FORMULA\\.NAME": "TRANSLATION"
}
Absolute cell references are evaluated correctly.

When dragging the bottom-right corner of a formula cell to copy its contents to
other cells, absolute cell references will be incremented or decremented
appropriately (only relative axes will be modified, not absolute).

When adding or removing rows or columns, absolute cell references will be
adjusted appropriately.
The initial click sets the cell reference range start position.

If the click is held, the cell reference range end position is updated on mouse
move. The cell reference range can then be modified in the same ways as a
single cell reference (e.g., arrow keys).
If the user is editing a cell reference range within a formula and is holding
the shift key while using the direction arrows to move the range, the start
of the range will be fixed.

This mirrors the behavior of Excel when editing a cell reference range.
@jkirschner
Copy link
Owner

I'm going to rebase this into the relevant commit in my PR that contains the bug and maintain your authorship. I'll do that instead of performing a PR merge. I'll close this PR when that action is complete. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants